package cn.edu.sdjzu.xg.bysj.domain;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 志愿条目
 * 包括了老师信息与志愿顺序
 * 本类不需要id
 */
@Setter
@Getter
public class ApplicationForSupervisorEntry implements Comparable<ApplicationForSupervisorEntry>, Serializable {
    //获取teacher字段
    private Teacher teacher;
    //志愿顺序
    private int priority;
    //获取pplicationForSupervisor
    private ApplicationForSupervisor applicationForSupervisor;
    //空构造器
    public ApplicationForSupervisorEntry(){}
    //构造器
    public ApplicationForSupervisorEntry(Teacher teacher , Integer priority){
        this.teacher = teacher;
        this.priority = priority;
    }

    @Override
    public int compareTo(ApplicationForSupervisorEntry o) {
        return this.priority-o.priority;
    }

    @Override
    public String toString() {
        return "" + teacher.toString() + " " + priority;
    }
}
